package com.herench.bunch.clinic.handler;


import com.herench.bunch.clinic.convert.DeptClinicAppointConvert;
import com.herench.bunch.clinic.support.AbstractClinicMessageHandler;
import com.herench.bunch.commons.annotation.Handler;
import com.herench.bunch.commons.support.WsClientFactory;
import org.apache.cxf.endpoint.Client;
import org.dom4j.Document;

@Handler(code = "200030",name = "查询预约排班",messageConvertClass = DeptClinicAppointConvert.class)
public class LoadDeptClinicAppointHandlerClinic extends AbstractClinicMessageHandler {

    @Override
    protected Object proxyInvoke(Object inMessage) throws Exception {
        Document message = (Document) inMessage;

        Client client = WsClientFactory.getInstance().getWsClient(ProxyMsgCodeConstant.HIS_YY_URL);
        Object[] res = client.invoke(ProxyMsgCodeConstant.HIS_YY_DEFAULT_OPEARTION, message.asXML());
        return  res[0];
    }

}
